-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Encourage the use of root_path in production to ensure single deployment #1712
base: main
Are you sure you want to change the base?
Encourage the use of root_path in production to ensure single deployment #1712
Conversation
Co-authored-by: Pieter Noordhuis <[email protected]>
742210c
to
3973c50
Compare
3973c50
to
6ea5306
Compare
@pietern @andrewnester could you take another look at this PR? The remaining thread should be resolved: #1712 (comment) |
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
// report an error for them. | ||
return diag.Warningf("target with 'mode: production' should " + advice) | ||
} | ||
return diag.Errorf("target with 'mode: production' must " + advice) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For follow-up: the advice should be a multi-line string in the Detail
field to render nicely. As is, it is shown as a single (wrapped) line. The warning case will light up in all cases where mode: production
is used and the root path is not specified.
Also, this doc page should be updated https://docs.databricks.com/en/dev-tools/bundles/deployment-modes.html#production-mode as well and linked from the warning to explain why the warning is shown while users haven't changed anything.
// and neither is setting a principal. | ||
// We only show a warning for these cases since we didn't historically | ||
// report an error for them. | ||
return diag.Warningf("target with 'mode: production' should " + advice) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Encourage" in the title means it's more a recommendation than a warning.
Since it will light up for existing users, a "recommendation" here is less forceful.
Changes
This updates
mode: production
to allowroot_path
to indicate uniqueness. Historically, we requiredrun_as
for this, which isn't actually very effective for that purpose.run_as
also had the problem that it doesn't work for pipelines.This is a cherry-pick from #1387